import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import fire from '@dfeidao/atom-web/msg/fire';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import error from '@dfeidao/atom-web/msgbox/error';
import success from '@dfeidao/atom-web/msgbox/success';
import hide from '@dfeidao/atom-web/ui/hide';
export default async function a002(fd: IFeidaoAiBrowserComponent) {
	// todo
	const a = get(fd, 'a');
	const res = await nodejs<{ code: 0 | 1; resulf: string }>('inventory-of-assets/zj-000004/s001', {
		filter: {
			record_no: a
		}
	});
	if (res.code === 1) {
		success("删除成功");
		fire('zj-000001','a001');
		hide(fd.data.node);
	} else {
		error("删除失败");
	}
}
